#ifndef JWAITBAR_H
#define JWAITBAR_H

#include <QTEGui/qteguiglobal.h>
#include <QWidget>

namespace QTE
{

class JWaitBarPrivate;

// 无尽的等待条
class QTEGUI_EXPORT JWaitBar : public QWidget
{
	Q_OBJECT

public:
	explicit JWaitBar(QWidget *parent = nullptr);
	~JWaitBar() override;

public:
	void start(int msecs = 200);
	void stop();

protected:
	void paintEvent(QPaintEvent *event) override;
	void resizeEvent(QResizeEvent *event) override;
	void showEvent(QShowEvent *event) override;
	void hideEvent(QHideEvent *event) override;

private:
	JWaitBarPrivate *d_ptr;
	Q_DISABLE_COPY(JWaitBar)
};

} //namespace QTE


#endif //JWAITBAR_H
